#include <iostream>
#include <gtest/gtest.h>
#include <unordered_map>
std::unordered_map<std::string, std::string> mymap;

class MyTest : public testing::Test
{
public:
    static void SetUpTestCase()
    {
        std::cout << "所有单元测试前执行,初始化总环境!\n";
    }
    static void TearDownTestCase()
    {
        std::cout << "所有单元测试完毕执行,清理总环境!\n";
    }

    std::unordered_map<std::string, std::string> _mymap;
};

TEST_F(MyTest, insert_test)
{
    mymap.insert({"hello", "你好"});
    mymap.insert({"apple", "苹果"});
}

TEST_F(MyTest, size_test)
{
    ASSERT_EQ(mymap.size(), 2);
}

int main(int argc, char *argv[])
{
    testing::InitGoogleTest(&argc, argv);
    RUN_ALL_TESTS();
    return 0;
}